home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / hiz / 09 / 09.exe / adynware.exe / perl / lib / Config.pm < prev    next >
Encoding:
Perl POD Document  |  1999-12-28  |  15.0 KB  |  708 lines

  1. package Config;
  2. use Exporter ();
  3. @ISA = (Exporter);
  4. @EXPORT = qw(%Config);
  5. @EXPORT_OK = qw(myconfig config_sh config_vars);
  6.  
  7. $] == 5.00402
  8.   or die "Perl lib version (5.00402) doesn't match executable version ($])";
  9.  
  10.  
  11.  
  12. my $config_sh = <<'!END!';
  13. archlibexp='c:\perl\lib'
  14. archname='MSWin32'
  15. cc='bcc32'
  16. ccflags='-D_RTLDLL -DWIN32'
  17. cppflags='-DWIN32'
  18. dlsrc='dl_win32.xs'
  19. dynamic_ext='Fcntl IO Opcode SDBM_File Socket'
  20. extensions='Fcntl IO Opcode SDBM_File Socket'
  21. installarchlib='c:\perl\lib'
  22. installprivlib='c:\perl\lib'
  23. libpth='D:\bc5\lib'
  24. libs='import32.lib cw32mti.lib odbc32.lib odbccp32.lib'
  25. osname='MSWin32'
  26. osvers='4.0'
  27. prefix='c:'
  28. privlibexp='c:\perl\lib'
  29. sharpbang='#!'
  30. shsharp='true'
  31. sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL'
  32. so='dll'
  33. startsh='#!/bin/sh'
  34. static_ext=' '
  35. sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 18 22'
  36. Author=''
  37. CONFIG='true'
  38. Date='$Date'
  39. Header=''
  40. Id='$Id'
  41. Locker=''
  42. Log='$Log'
  43. Mcc='Mcc'
  44. PATCHLEVEL='4'
  45. POSIX_cflags='ccflags="$ccflags -DSTRUCT_TM_HASZONE"'
  46. RCSfile='$RCSfile'
  47. Revision='$Revision'
  48. SUBVERSION='02'
  49. Source=''
  50. State=''
  51. afs='false'
  52. alignbytes='8'
  53. aphostname=''
  54. ar='tlib /P128'
  55. archlib='c:\perl\lib'
  56. archobjs=''
  57. awk='awk'
  58. baserev='5.0'
  59. bash=''
  60. bin='c:\perl\bin'
  61. binexp='c:\perl\bin'
  62. bison=''
  63. byacc='byacc'
  64. byteorder='1234'
  65. c=''
  66. castflags='0'
  67. cat='type'
  68. cccdlflags=''
  69. ccdlflags=' '
  70. cf_by='gsar'
  71. cf_email='gsar@pujyam'
  72. cf_time='Thu Apr 11 06:20:49 PDT 1996'
  73. chgrp=''
  74. chmod=''
  75. chown=''
  76. clocktype='clock_t'
  77. comm=''
  78. compress=''
  79. contains='grep'
  80. cp='copy'
  81. cpio=''
  82. cpp='cpp32'
  83. cpp_stuff='42'
  84. cpplast=''
  85. cppminus=''
  86. cpprun=''
  87. cppstdin=''
  88. cryptlib=''
  89. csh='undef'
  90. d_Gconvert='gcvt((x),(n),(b))'
  91. d_access='define'
  92. d_alarm='undef'
  93. d_archlib='define'
  94. d_attribut='undef'
  95. d_bcmp='undef'
  96. d_bcopy='undef'
  97. d_bincompat3='undef'
  98. d_bsd='define'
  99. d_bsdgetpgrp='undef'
  100. d_bsdpgrp='undef'
  101. d_bsdsetpgrp='undef'
  102. d_bzero='undef'
  103. d_casti32='define'
  104. d_castneg='define'
  105. d_charvspr='undef'
  106. d_chown='undef'
  107. d_chroot='undef'
  108. d_chsize='define'
  109. d_closedir='define'
  110. d_const='define'
  111. d_crypt='undef'
  112. d_csh='undef'
  113. d_cuserid='undef'
  114. d_dbl_dig='define'
  115. d_difftime='define'
  116. d_dirnamlen='define'
  117. d_dlerror='define'
  118. d_dlopen='define'
  119. d_dlsymun='undef'
  120. d_dosuid='undef'
  121. d_dup2='define'
  122. d_eofnblk='define'
  123. d_eunice='undef'
  124. d_fchmod='undef'
  125. d_fchown='undef'
  126. d_fcntl='undef'
  127. d_fd_macros='define'
  128. d_fd_set='define'
  129. d_fds_bits='define'
  130. d_fgetpos='define'
  131. d_flexfnam='define'
  132. d_flock='define'
  133. d_fork='undef'
  134. d_fpathconf='undef'
  135. d_fsetpos='define'
  136. d_getgrps='undef'
  137. d_gethent='undef'
  138. d_gethname='undef'
  139. d_getlogin='undef'
  140. d_getpgid='undef'
  141. d_getpgrp2='undef'
  142. d_getpgrp='undef'
  143. d_getppid='undef'
  144. d_getprior='undef'
  145. d_gettimeod='undef'
  146. d_htonl='define'
  147. d_index='undef'
  148. d_inetaton='undef'
  149. d_isascii='define'
  150. d_killpg='undef'
  151. d_link='undef'
  152. d_locconv='define'
  153. d_lockf='undef'
  154. d_lstat='undef'
  155. d_mblen='define'
  156. d_mbstowcs='define'
  157. d_mbtowc='define'
  158. d_memcmp='define'
  159. d_memcpy='define'
  160. d_memmove='define'
  161. d_memset='define'
  162. d_mkdir='define'
  163. d_mkfifo='undef'
  164. d_mktime='define'
  165. d_msg='undef'
  166. d_msgctl='define'
  167. d_msgget='define'
  168. d_msgrcv='define'
  169. d_msgsnd='define'
  170. d_mymalloc='undef'
  171. d_nice='undef'
  172. d_oldarchlib='undef'
  173. d_oldsock='undef'
  174. d_open3='undef'
  175. d_pathconf='undef'
  176. d_pause='define'
  177. d_phostname='undef'
  178. d_pipe='define'
  179. d_poll='undef'
  180. d_portable='define'
  181. d_pwage='undef'
  182. d_pwchange='undef'
  183. d_pwclass='undef'
  184. d_pwcomment='undef'
  185. d_pwexpire='undef'
  186. d_pwquota='undef'
  187. d_readdir='define'
  188. d_readlink='undef'
  189. d_rename='define'
  190. d_rewinddir='define'
  191. d_rmdir='define'
  192. d_safebcpy='undef'
  193. d_safemcpy='undef'
  194. d_sanemcmp='define'
  195. d_seekdir='define'
  196. d_select='define'
  197. d_sem='undef'
  198. d_semctl='define'
  199. d_semget='define'
  200. d_semop='define'
  201. d_setegid='undef'
  202. d_seteuid='undef'
  203. d_setgrps='undef'
  204. d_setlinebuf='undef'
  205. d_setlocale='define'
  206. d_setpgid='undef'
  207. d_setpgrp2='undef'
  208. d_setpgrp='undef'
  209. d_setprior='undef'
  210. d_setregid='undef'
  211. d_setresgid='undef'
  212. d_setresuid='undef'
  213. d_setreuid='undef'
  214. d_setrgid='undef'
  215. d_setruid='undef'
  216. d_setsid='undef'
  217. d_sfio='undef'
  218. d_shm='undef'
  219. d_shmat='undef'
  220. d_shmatprototype='undef'
  221. d_shmctl='define'
  222. d_shmdt='define'
  223. d_shmget='define'
  224. d_shrplib='undef'
  225. d_sigaction='undef'
  226. d_sigintrp=''
  227. d_sigsetjmp='undef'
  228. d_sigvec='define'
  229. d_sigvectr='undef'
  230. d_socket='define'
  231. d_sockpair='undef'
  232. d_statblks='undef'
  233. d_stdio_cnt_lval='define'
  234. d_stdio_ptr_lval='define'
  235. d_stdiobase='define'
  236. d_stdstdio='define'
  237. d_strchr='define'
  238. d_strcoll='define'
  239. d_strctcpy='define'
  240. d_strerrm='strerror(e)'
  241. d_strerror='define'
  242. d_strtod='define'
  243. d_strtol='define'
  244. d_strtoul='define'
  245. d_strxfrm='define'
  246. d_suidsafe='undef'
  247. d_symlink='undef'
  248. d_syscall='undef'
  249. d_sysconf='undef'
  250. d_sysernlst=''
  251. d_syserrlst='define'
  252. d_system='define'
  253. d_tcgetpgrp='undef'
  254. d_tcsetpgrp='undef'
  255. d_telldir='define'
  256. d_time='define'
  257. d_times='define'
  258. d_truncate='undef'
  259. d_tzname='define'
  260. d_umask='define'
  261. d_uname='undef'
  262. d_vfork='undef'
  263. d_void_closedir='undef'
  264. d_voidsig='define'
  265. d_voidtty=''
  266. d_volatile='define'
  267. d_vprintf='define'
  268. d_wait4='undef'
  269. d_waitpid='undef'
  270. d_wcstombs='define'
  271. d_wctomb='define'
  272. d_xenix='undef'
  273. date='date'
  274. db_hashtype='int'
  275. db_prefixtype='int'
  276. defvoidused='15'
  277. direntrytype='struct direct'
  278. dlext='dll'
  279. eagain='EAGAIN'
  280. echo='echo'
  281. egrep='egrep'
  282. emacs=''
  283. eunicefix=':'
  284. exe_ext='.exe'
  285. expr='expr'
  286. find='find'
  287. firstmakefile='makefile'
  288. flex=''
  289. fpostype='fpos_t'
  290. freetype='void'
  291. full_csh=''
  292. full_sed=''
  293. gcc=''
  294. gccversion=''
  295. gidtype='gid_t'
  296. glibpth='/usr/shlib  /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
  297. grep='grep'
  298. groupcat=''
  299. groupstype='gid_t'
  300. h_fcntl='false'
  301. h_sysfile='true'
  302. hint='recommended'
  303. hostcat='ypcat hosts'
  304. huge=''
  305. i_bsdioctl=''
  306. i_db='undef'
  307. i_dbm='undef'
  308. i_dirent='define'
  309. i_dld='undef'
  310. i_dlfcn='define'
  311. i_fcntl='define'
  312. i_float='define'
  313. i_gdbm='define'
  314. i_grp='define'
  315. i_limits='define'
  316. i_locale='define'
  317. i_malloc='define'
  318. i_math='define'
  319. i_memory='undef'
  320. i_ndbm='undef'
  321. i_neterrno='undef'
  322. i_niin='undef'
  323. i_pwd='undef'
  324. i_rpcsvcdbm='define'
  325. i_sfio='undef'
  326. i_sgtty='undef'
  327. i_stdarg='define'
  328. i_stddef='define'
  329. i_stdlib='define'
  330. i_string='define'
  331. i_sysdir='undef'
  332. i_sysfile='undef'
  333. i_sysfilio='define'
  334. i_sysin='undef'
  335. i_sysioctl='undef'
  336. i_sysndir='undef'
  337. i_sysparam='undef'
  338. i_sysresrc='undef'
  339. i_sysselct='undef'
  340. i_syssockio=''
  341. i_sysstat='define'
  342. i_systime='undef'
  343. i_systimek='undef'
  344. i_systimes='undef'
  345. i_systypes='define'
  346. i_sysun='undef'
  347. i_syswait='undef'
  348. i_termio='undef'
  349. i_termios='undef'
  350. i_time='define'
  351. i_unistd='undef'
  352. i_utime='define'
  353. i_values='undef'
  354. i_varargs='undef'
  355. i_varhdr='varargs.h'
  356. i_vfork='undef'
  357. incpath='D:\bc5\include'
  358. inews=''
  359. installbin='c:\perl\bin'
  360. installman1dir='c:\perl\man\man1'
  361. installman3dir='c:\perl\man\man3'
  362. installscript='c:\perl\bin'
  363. installsitearch='c:\perl\lib\site'
  364. installsitelib='c:\perl\lib\site'
  365. intsize='4'
  366. known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket'
  367. ksh=''
  368. large=''
  369. ld='tlink32'
  370. lddlflags='-Tpd'
  371. ldflags=''
  372. less='less'
  373. lib_ext='.lib'
  374. libc='cw32mti.lib'
  375. libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
  376. line='line'
  377. lint=''
  378. lkflags=''
  379. ln=''
  380. lns='copy'
  381. locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
  382. loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
  383. longsize='4'
  384. lp=''
  385. lpr=''
  386. ls='dir'
  387. lseektype='off_t'
  388. mail=''
  389. mailx=''
  390. make='dmake'
  391. mallocobj='malloc.o'
  392. mallocsrc='malloc.c'
  393. malloctype='void *'
  394. man1dir='c:\perl\man\man1'
  395. man1direxp='c:\perl\man\man1'
  396. man1ext='1'
  397. man3dir='c:\perl\man\man3'
  398. man3direxp='c:\perl\man\man3'
  399. man3ext='3'
  400. medium=''
  401. mips=''
  402. mips_type=''
  403. mkdir='mkdir'
  404. models='none'
  405. modetype='mode_t'
  406. more='more /e'
  407. mv=''
  408. myarchname='MSWin32'
  409. mydomain=''
  410. myhostname=''
  411. myuname=''
  412. n='-n'
  413. nm_opt=''
  414. nm_so_opt=''
  415. nroff=''
  416. o_nonblock='O_NONBLOCK'
  417. obj_ext='.obj'
  418. oldarchlib=''
  419. oldarchlibexp=''
  420. optimize='-O'
  421. orderlib='false'
  422. package='perl5'
  423. pager='more /e'
  424. passcat=''
  425. patchlevel='2'
  426. path_sep=';'
  427. perl='perl'
  428. perladmin=''
  429. perlpath='c:\perl\bin\perl.exe'
  430. pg=''
  431. phostname='hostname'
  432. plibpth=''
  433. pmake=''
  434. pr=''
  435. prefixexp='c:'
  436. privlib='c:\perl\lib'
  437. prototype='define'
  438. randbits='15'
  439. ranlib=''
  440. rd_nodata='-1'
  441. rm='del'
  442. rmail=''
  443. runnm='true'
  444. scriptdir='c:\perl\bin'
  445. scriptdirexp='c:\perl\bin'
  446. sed='sed'
  447. selecttype='int *'
  448. sendmail='blat'
  449. sh='cmd /x /c'
  450. shar=''
  451. shmattype='void *'
  452. shortsize='2'
  453. shrpdir='none'
  454. signal_t='void'
  455. sitearch='c:\perl\lib\site'
  456. sitearchexp='c:\perl\lib\site'
  457. sitelib='c:\perl\lib\site'
  458. sitelibexp='c:\perl\lib\site'
  459. sizetype='size_t'
  460. sleep=''
  461. smail=''
  462. small=''
  463. sockethdr=''
  464. socketlib=''
  465. sort='sort'
  466. spackage='Perl5'
  467. spitshell=''
  468. split=''
  469. ssizetype='int'
  470. startperl='#perl'
  471. stdchar='unsigned char'
  472. stdio_base='((fp)->buffer)'
  473. stdio_bufsiz='((fp)->level + (fp)->curp - (fp)->buffer)'
  474. stdio_cnt='((fp)->level)'
  475. stdio_ptr='((fp)->curp)'
  476. strings='/usr/include/string.h'
  477. submit=''
  478. sysman='/usr/man/man1'
  479. tail=''
  480. tar=''
  481. tbl=''
  482. test=''
  483. timeincl='/usr/include/sys/time.h '
  484. timetype='time_t'
  485. touch='touch'
  486. tr=''
  487. troff=''
  488. uidtype='uid_t'
  489. uname='uname'
  490. uniq='uniq'
  491. usedl='define'
  492. usemymalloc='n'
  493. usenm='false'
  494. useperlio='undef'
  495. useposix='true'
  496. usesafe='true'
  497. usevfork='false'
  498. usrinc='/usr/include'
  499. uuname=''
  500. vi=''
  501. voidflags='15'
  502. xlibpth='/usr/lib/386 /lib/386'
  503. zcat=''
  504. !END!
  505.  
  506. my $summary = <<'!END!';
  507. Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
  508.   Platform:
  509.     osname=$osname, osvers=$osvers, archname=$archname
  510.     uname='$myuname'
  511.     hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction
  512.     bincompat3=$bincompat3 useperlio=$useperlio d_sfio=$d_sfio
  513.   Compiler:
  514.     cc='$cc', optimize='$optimize', gccversion=$gccversion
  515.     cppflags='$cppflags'
  516.     ccflags ='$ccflags'
  517.     stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
  518.     voidflags=$voidflags, castflags=$castflags, d_casti32=$d_casti32, d_castneg=$d_castneg
  519.     intsize=$intsize, alignbytes=$alignbytes, usemymalloc=$usemymalloc, randbits=$randbits
  520.   Linker and Libraries:
  521.     ld='$ld', ldflags ='$ldflags'
  522.     libpth=$libpth
  523.     libs=$libs
  524.     libc=$libc, so=$so
  525.     useshrplib=$useshrplib, libperl=$libperl
  526.   Dynamic Linking:
  527.     dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
  528.     cccdlflags='$cccdlflags', lddlflags='$lddlflags'
  529.  
  530. !END!
  531. my $summary_expanded = 0;
  532.  
  533. sub myconfig {
  534.     return $summary if $summary_expanded;
  535.     $summary =~ s{\$(\w+)}
  536.              { my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
  537.     $summary_expanded = 1;
  538.     $summary;
  539. }
  540.  
  541. sub FETCH { 
  542.     return $_[0]->{$_[1]} if (exists $_[0]->{$_[1]});
  543.  
  544.     my($value, $start, $marker);
  545.     $marker = "$_[1]='";
  546.     $start = index($config_sh, "\n$marker");
  547.     return undef if ( ($start == -1) &&  # in case it's first 
  548.         (substr($config_sh, 0, length($marker)) ne $marker) );
  549.     if ($start == -1) { $start = length($marker) } 
  550.         else { $start += length($marker) + 1 }
  551.     $value = substr($config_sh, $start, 
  552.         index($config_sh, qq('\n), $start) - $start);
  553.  
  554.     $value = undef if $value eq 'undef'; # So we can say "if $Config{'foo'}".
  555.     $_[0]->{$_[1]} = $value; # cache it
  556.     return $value;
  557. }
  558.  
  559. my $prevpos = 0;
  560.  
  561. sub FIRSTKEY {
  562.     $prevpos = 0;
  563.     substr($config_sh, 0, index($config_sh, '=') );
  564. }
  565.  
  566. sub NEXTKEY {
  567.     my $pos = index($config_sh, qq('\n), $prevpos) + 2;
  568.     my $len = index($config_sh, "=", $pos) - $pos;
  569.     $prevpos = $pos;
  570.     $len > 0 ? substr($config_sh, $pos, $len) : undef;
  571. }
  572.  
  573. sub EXISTS { 
  574.     exists($_[0]->{$_[1]}) or
  575.     index($config_sh, "\n$_[1]='") != -1 or
  576.     substr($config_sh, 0, length($_[1])+2) eq "$_[1]='";
  577. }
  578.  
  579. sub STORE  { die "\%Config::Config is read-only\n" }
  580. sub DELETE { &STORE }
  581. sub CLEAR  { &STORE }
  582.  
  583.  
  584. sub config_sh {
  585.     $config_sh
  586. }
  587.  
  588. sub config_re {
  589.     my $re = shift;
  590.     my @matches = ($config_sh =~ /^$re=.*\n/mg);
  591.     @matches ? (print @matches) : print "$re: not found\n";
  592. }
  593.  
  594. sub config_vars {
  595.     foreach(@_){
  596.     config_re($_), next if /\W/;
  597.     my $v=(exists $Config{$_}) ? $Config{$_} : 'UNKNOWN';
  598.     $v='undef' unless defined $v;
  599.     print "$_='$v';\n";
  600.     }
  601. }
  602.  
  603. sub TIEHASH { bless {} }
  604.  
  605. tie %Config, 'Config';
  606.  
  607. 1;
  608. __END__
  609.  
  610. =head1 NAME
  611.  
  612. Config - access Perl configuration information
  613.  
  614. =head1 SYNOPSIS
  615.  
  616.     use Config;
  617.     if ($Config{'cc'} =~ /gcc/) {
  618.     print "built by gcc\n";
  619.     } 
  620.  
  621.     use Config qw(myconfig config_sh config_vars);
  622.  
  623.     print myconfig();
  624.  
  625.     print config_sh();
  626.  
  627.     config_vars(qw(osname archname));
  628.  
  629.  
  630. =head1 DESCRIPTION
  631.  
  632. The Config module contains all the information that was available to
  633. the C<Configure> program at Perl build time (over 900 values).
  634.  
  635. Shell variables from the F<config.sh> file (written by Configure) are
  636. stored in the readonly-variable C<%Config>, indexed by their names.
  637.  
  638. Values stored in config.sh as 'undef' are returned as undefined
  639. values.  The perl C<exists> function can be used to check if a
  640. named variable exists.
  641.  
  642. =over 4
  643.  
  644. =item myconfig()
  645.  
  646. Returns a textual summary of the major perl configuration values.
  647. See also C<-V> in L<perlrun/Switches>.
  648.  
  649. =item config_sh()
  650.  
  651. Returns the entire perl configuration information in the form of the
  652. original config.sh shell variable assignment script.
  653.  
  654. =item config_vars(@names)
  655.  
  656. Prints to STDOUT the values of the named configuration variable. Each is
  657. printed on a separate line in the form:
  658.  
  659.   name='value';
  660.  
  661. Names which are unknown are output as C<name='UNKNOWN';>.
  662. See also C<-V:name> in L<perlrun/Switches>.
  663.  
  664. =back
  665.  
  666. =head1 EXAMPLE
  667.  
  668. Here's a more sophisticated example of using %Config:
  669.  
  670.     use Config;
  671.     use strict;
  672.  
  673.     my %sig_num;
  674.     my @sig_name;
  675.     unless($Config{sig_name} && $Config{sig_num}) {
  676.     die "No sigs?";
  677.     } else {
  678.     my @names = split ' ', $Config{sig_name};
  679.     @sig_num{@names} = split ' ', $Config{sig_num};
  680.     foreach (@names) {
  681.         $sig_name[$sig_num{$_}] ||= $_;
  682.     }   
  683.     }
  684.  
  685.     print "signal #17 = $sig_name[17]\n";
  686.     if ($sig_num{ALRM}) { 
  687.     print "SIGALRM is $sig_num{ALRM}\n";
  688.     }   
  689.  
  690. =head1 WARNING
  691.  
  692. Because this information is not stored within the perl executable
  693. itself it is possible (but unlikely) that the information does not
  694. relate to the actual perl binary which is being used to access it.
  695.  
  696. The Config module is installed into the architecture and version
  697. specific library directory ($Config{installarchlib}) and it checks the
  698. perl version number when loaded.
  699.  
  700. =head1 NOTE
  701.  
  702. This module contains a good example of how to use tie to implement a
  703. cache and an example of how to make a tied variable readonly to those
  704. outside of it.
  705.  
  706. =cut
  707.  
  708.